#pragma once
#include "Texture.h"
#include "Timer.h"
class CTextureSynthesis
{
public:
	CTextureSynthesis(void);
	virtual ~CTextureSynthesis(void);
	
	bool LoadInput(const wchar_t * filename);
	bool LoadNoise(const wchar_t * filename);
	void Process();
	void Process(int x,int y);

	float Distant(BYTE * a,BYTE * b);
	float Similarity(CTexture * tex1,
					CTexture * tex2,
					int x1,
					int y1,
					int x2,
					int y2);
	float Similarity(CTexture *tex1,int x1,int y1,BYTE* pixel);
	void GetPixelFromWin(CTexture* tex1,int x1,int y1,BYTE * pixel);
	int GetOutPutWidth() const{return mNoise.GetWidth();}
	int GetOutPutHeight() const{return mNoise.GetHeight();}
	void SetWindow(int w,int h){winWidth=w,winHeight=h;}

public:
	CTexture mInput;
	CTexture mNoise;
	CTimer mTimer;
	int winWidth,winHeight;

};
